<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择器</title>
    <style>
        /*标签选择器*/
        /*id选择器*/
        #p1 {
            color: red;
        }
        /*类选择器*/
        .class1{
            color: cornflowerblue;
        }
        /*分组选择器*/
        h3,#p1,.class1{
            background-color: bisque;
        }
        /*属性选择器*/
        input[type='text']{background-color: red}
        input[type='password']{color: green}
        /*任意元素选择器*/
        *{
            border: 1px solid red;
        }
    </style>
</head>
<body>
<p id="p1">苹果</p>
<p class="class1">香蕉</p>
<p>西瓜</p>
<div>电脑</div>
<div class="class1">手机</div>
<div>终端</div>
<input type="text">
<input type="password">
</body>
</html>